import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { HomeComponent } from './home/home.component';
import { StartComponent } from './home/start/start.component';
import {ExplainComponent} from "./home/explain/explain.component";
import {AnswerComponent} from "./home/answer/answer.component";
import {ResultComponent} from "./home/result/result.component";
import {UploadComponent} from "./home/upload/upload.component";

export const routes: Routes = [
  //首页
  {
    path: 'home', component: HomeComponent, data: { menu: 'home' },
    children: [
      { path: 'start', component: StartComponent, data: { menu: 'home', submenu: 'start' } },
      { path: '', redirectTo: 'start', pathMatch: 'full' },
      {path: 'explain', component: ExplainComponent},
      {path: 'answer', component: AnswerComponent},
      {path: 'result', component: ResultComponent},
      {path: 'upload', component: UploadComponent},
    ]
  },
  { path: '', redirectTo: 'home', pathMatch: 'full' },
];
@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule],
  providers: [

  ]
})
export class AppRoutingModule { }
